<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AngularJS Ajax Demo</title>
    <script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <h2>AngularJS Sample Application</h2>
    <div ng-app="MainApp" ng-controller="StudentController">
        <table class="table">
            <tr>
                <th>Name</th>
                <th>Roll No.</th>
                <th>Percentage</th>
            </tr>
            <tr ng-repeat="student in students">
                <td>{{ student.Name }}</td>
                <td>{{ student.RollNo }}</td>
                <td>{{ student.Percentage }}</td>
            </tr>
        </table>
    </div>
    <script>
        var mainApp = angular.module('MainApp', []);
        mainApp.controller('StudentController', function($scope, $http) {
            var url = "data.txt";
            $http.get(url).success(function(res) {
                console.log(res);
                $scope.students = res;
            });
        });
    </script>
</body>
</html>